package com.broada.component.flexcom.entity
{
	import com.degrafa.GeometryGroup;
	import com.degrafa.geometry.Circle;
	import com.degrafa.paint.SolidFill;
	import com.degrafa.paint.SolidStroke;
	import com.greensock.TweenMax;

	public class PointItem
	{
		public var id:String;
		public var group:GeometryGroup;
		public var point:Circle;
		
		private var solidFill:SolidFill = new SolidFill("red");
		private var solidStroke:SolidStroke = new SolidStroke("white",1,1);
		
		public function PointItem(pid:String, cx:Number, cy:Number, radius:Number)
		{
			id = pid;
			group = new GeometryGroup();
			point = new Circle(cx, cy, radius);
			point.fill = solidFill;
			point.stroke = solidStroke;
			group.geometryCollection.addItem(point);
			flicker = true;
		}
		
		public function set flicker(value:Boolean):void{
			if(value){
//				TweenMax.to(group, 1, {glowFilter:{color:0xffffff, alpha:1, blurX:20, blurY:20,strength:3},repeat:-1,repeatDelay:0.5});
				point.radius = 20;
				solidFill.alpha = 0.8;
			}else{
				TweenMax.to(group, 1, {glowFilter:{remove:true}});
			}
		}
	}
}